import Request from '../utils/http.js';
import config from '../utils/config.js'

export default {
	//获取分类
	getcate: function(params) {
		return Request.httpTokenRequest({
			url: '/api/Schoolcourse/getcate',
			method: 'POST',
			params: params
		});
	},
	
	//获取二级分类
	getsecondcate: function(params) {
		return Request.httpTokenRequest({
			url: '/api/Schoolcourse/getsecondcate',
			method: 'POST',
			params: params
		});
	},
	
	//获取列表
	getlist: function(params) {
		return Request.httpTokenRequest({
			url: '/api/Schoolcourse/getlist',
			method: 'POST',
			params: params
		});
	},
	
	//获取页面详情
	getlistinfo: function(params) {
		return Request.httpTokenRequest({
			url: '/api/Schoolcourse/getlistinfo',
			method: 'POST',
			params: params
		});
	},
	
	// 获取用户详情
	getUserInfo: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/getUserInfo',
			method: 'POST',
			params: params
		});
	},
	
	// 开通课程
	opencourse: function(params) {
		return Request.httpTokenRequest({
			url: '/api/Schoolcourse/opencourse',
			method: 'POST',
			params: params
		});
	},
	
	// 获取课程详情
	getCollegeDetail: function(params) {
		return Request.httpTokenRequest({
			url: '/api/College/getCollegeDetail',
			method: 'POST',
			params: params
		});
	},
	
	// 购买课程
	courseBuy: function(params) {
		return Request.httpTokenRequest({
			url: '/api/College/course_buy',
			method: 'POST',
			params: params
		});
	}
}